package top.wyz5204.service.impl;

import top.wyz5204.domain.User;
import top.wyz5204.mapper.UserMapper;
import top.wyz5204.service.UserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author top.wyz5204
 * @since 2023-01-01 22:02
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Override
    public Integer insert(String name, int age, String email) {
        return baseMapper.insert(new User(name, age, email));
    }

    @Override
    public List<User> selectAll() {
        return baseMapper.selectAll();
    }
}
